import { Selector, Divider } from 'antd-mobile'
import { useStore4Analysis } from '../../../../store'

import './index.less'

function PeriodSelector() {
  const periodCount = useStore4Analysis(state => state.periodCount)
  const setPeriodCount = useStore4Analysis(state => state.setPeriodCount)

  return (
    <>
      <Selector
        className='selector-cls'
        options={[{
          label: '500期',
          value: 500,
        },
        {
          label: '400期',
          value: 400,
        },
        {
          label: '300期',
          value: 300,
        }, {
          label: '200期',
          value: 200,
        },]}
        columns={4}
        value={[periodCount]}
        onChange={(v) => { setPeriodCount(v[0]) }}
      >
      </Selector>
    </>
  )
}

export default PeriodSelector